'''
窗口截图的常用方法：
(1)get_screenshot_as_file()		截图函数
(2)save_screenshot()			截图函数
'''
from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.common.action_chains import ActionChains
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.support.wait import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC  # 起个别名
from time import sleep
from options import options
from service import service

dr=webdriver.Chrome(options=options,service=service)
dr.get(r'https://www.baidu.com/')
dr.maximize_window()
sleep(1)

dr.get_screenshot_as_file(r'baidu1.png')
dr.save_screenshot(r'baidu2.png')
dr.quit()